<?php
/* @var $this MemAddresController */
/* @var $model MemAddres */
/* @var $form CActiveForm */
?>

<div class="add_address mt10">
	<div class="hd"><span class="f_r">带<strong class="c_red">*</strong>为必填项</span><h3>新增地址</h3><h3 class="d_n">修改地址</h3></div>
	<div class="bd">
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'address-form',
			'action'=>!empty($model->zma_id)?$this->pre_module_url.'/express/addressupdate':$this->pre_module_url.'/express/addresscreate',
			'enableAjaxValidation'=>false,
		)); ?>
			<?php echo $form->HiddenField($model,'zm_id')?>
			<?php echo $form->HiddenField($model,'zma_id')?>
			<ul class="form_list">
				<li>
					<span class="tit"><em class="xing">*</em>联系人：</span>
					<?php echo $form->textField($model,'zma_name',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_nameTip"></span>
				</li>
				<li>
					<span class="tit"><em class="xing">*</em>所在地区：</span>
					<?php Area::getAreainfo('MemAddres',$model->zar_id,'clasname'); ?>
					<span id="MemAddres_zar_idTip"></span>
				</li>
				<li>
					<span class="tit"><em class="xing">*</em>街道地址：</span>
					<?php echo $form->textField($model,'zma_address',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_addressTip"></span>
				</li>
				<li>
					<span class="tit"><em class="xing">*</em>邮政编码：</span>
					<?php echo $form->textField($model,'zma_zip',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_zipTip"></span>
				</li>
				<li>
					<span class="tit"><em class="xing">*</em>邮箱：</span>
					<?php echo $form->textField($model,'zma_email',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_emailTip"></span>
				</li>
				<li>
					<span class="tit"><em class="xing">*</em>手机：</span>
					<?php echo $form->textField($model,'zma_mob',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_mobTip"></span>
				</li>
				<li>
					<span class="tit">固定电话：</span>
					<?php echo $form->textField($model,'zma_tel',array('class'=>'t_ipt ipt_bg')); ?>
					<?php echo $form->error($model,'zma_tel'); ?>
				</li>
				<li class="submit">
					<span class="tit"></span>
					<?php echo CHtml::submitButton(Yii::t('cmp','Save'),array('class'=>'mem_btn mem_btn18')); ?>
					<?php echo CHtml::resetButton(Yii::t('cmp','Reset'),array('class'=>'mem_btn mem_btn07')); ?>
				</li>
			</ul>
		<?php $this->endWidget(); ?>
	</div>
</div><!-- form -->
		
 <!-- 表单验证 -->
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl;?>/js/formvalidata/formValidator-4.1.1.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl;?>/js/formvalidata/formValidatorRegex.js"></script>
 <script>
	jQuery(document).ready(function($) {
		$.formValidator.initConfig({theme:"Default",formID:"address-form",
			onError:function(msg, obj){
						alert(msg);
						return false;
					},
			onsuccess:function(){ return true; }
		});
	})
</script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl;?>/js/formvalidata/cmpValidate.js"></script> 